Skip to content

Add inching, indicator mode, fix dp in timer device#12105

Merged
Koenkk merged 21 commits intoKoenkk:masterfrom
ohadvano:patch-5
May 7, 2026
Merged

Add inching, indicator mode, fix dp in timer device#12105
Koenkk merged 21 commits intoKoenkk:masterfrom
ohadvano:patch-5

Conversation

@ohadvano
Copy link
Copy Markdown
Contributor

@ohadvano ohadvano commented May 4, 2026

Link to picture pull request: TODO

@ohadvano ohadvano changed the title Add inching configuration to Tuya device Add inching configuration to Tuya device and fix dp May 4, 2026
@ohadvano ohadvano changed the title Add inching configuration to Tuya device and fix dp Add inching, indicator mode, fix dp in timer device May 4, 2026
Comment thread src/devices/tuya.ts Outdated
19,
"inching",
{
from: (value) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for inching must be put in the lib, so other devices can re-use it.

And there already is tuya.valueConverter.inchingSwitch - can you check if that works?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I added is a different definition than the existing one. What I added behaves similar to how the Tuya app exposes inching, so no

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good to move this into lib/tuya.ts as inchingSwitch2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I adjusted

Comment thread src/devices/tuya.ts Outdated
e.enum("indicator_mode", ea.STATE_SET, ["none", "relay", "pos"]).withDescription("Indicator status behavior"),
e.binary("backlight_mode", ea.STATE_SET, "ON", "OFF").withDescription("Backlight"),
e.enum("off_color", ea.STATE_SET, ["red", "blue", "green", "white", "yellow", "magenta", "cyan"]).withDescription("OFF Color"),
e
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

te.inchingSwitch() should work ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, see other comment

@ohadvano
Copy link
Copy Markdown
Contributor Author

ohadvano commented May 5, 2026

thanks for the review, the definition I added is a separate one that matches how Tuya app exposes inching so current definition can't be reused

@ohadvano ohadvano requested a review from Koenkk May 5, 2026 21:25
Comment thread src/devices/tuya.ts Outdated
@ohadvano
Copy link
Copy Markdown
Contributor Author

ohadvano commented May 7, 2026

@Koenkk is this ready for merging?

@Koenkk Koenkk merged commit 21f208f into Koenkk:master May 7, 2026
3 checks passed
@Koenkk
Copy link
Copy Markdown
Owner

Koenkk commented May 7, 2026

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants